package org.aynu.propertyservice.feign;

import org.aynu.userservice.common.UserResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
import java.util.Map;

@FeignClient(name = "User-Service")
public interface UserServiceClient {

    // 原有接口保留
    @PostMapping(path = "/user/selectAllUserId", consumes = MediaType.APPLICATION_JSON_VALUE)
    ResponseEntity<UserResponse<Map<String, Object>>> selectAllUserId();

    // 新增接口：获取所有用户信息
    @PostMapping(path = "/user/selectAllUser", consumes = MediaType.APPLICATION_JSON_VALUE)
    ResponseEntity<UserResponse<List<Map<String, Object>>>> selectAllUser();
}